Integrand size = 33, antiderivative size = 353 \[ \int \frac {\cos ^m(c+d x) \left (A+C \cos ^2(c+d x)\right )}{a+b \cos (c+d x)} \, dx=\frac {a \left (A b^2+a^2 C\right ) \operatorname {AppellF1}\left (\frac {1}{2},\frac {1-m}{2},1,\frac {3}{2},\sin ^2(c+d x),-\frac {b^2 \sin ^2(c+d x)}{a^2-b^2}\right ) \cos ^{-1+m}(c+d x) \cos ^2(c+d x)^{\frac {1-m}{2}} \sin (c+d x)}{b^2 \left (a^2-b^2\right ) d}-\frac {\left (A b^2+a^2 C\right ) \operatorname {AppellF1}\left (\frac {1}{2},-\frac {m}{2},1,\frac {3}{2},\sin ^2(c+d x),-\frac {b^2 \sin ^2(c+d x)}{a^2-b^2}\right ) \cos ^m(c+d x) \cos ^2(c+d x)^{-m/2} \sin (c+d x)}{b \left (a^2-b^2\right ) d}+\frac {a C \cos ^{1+m}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+m}{2},\frac {3+m}{2},\cos ^2(c+d x)\right ) \sin (c+d x)}{b^2 d (1+m) \sqrt {\sin ^2(c+d x)}}-\frac {C \cos ^{2+m}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2+m}{2},\frac {4+m}{2},\cos ^2(c+d x)\right ) \sin (c+d x)}{b d (2+m) \sqrt {\sin ^2(c+d x)}} \]
a*(A*b^2+C*a^2)*AppellF1(1/2,-1/2*m+1/2,1,3/2,sin(d*x+c)^2,-b^2*sin(d*x+c) ^2/(a^2-b^2))*cos(d*x+c)^(-1+m)*(cos(d*x+c)^2)^(-1/2*m+1/2)*sin(d*x+c)/b^2 /(a^2-b^2)/d-(A*b^2+C*a^2)*AppellF1(1/2,-1/2*m,1,3/2,sin(d*x+c)^2,-b^2*sin (d*x+c)^2/(a^2-b^2))*cos(d*x+c)^m*sin(d*x+c)/b/(a^2-b^2)/d/((cos(d*x+c)^2) ^(1/2*m))+a*C*cos(d*x+c)^(1+m)*hypergeom([1/2, 1/2+1/2*m],[3/2+1/2*m],cos( d*x+c)^2)*sin(d*x+c)/b^2/d/(1+m)/(sin(d*x+c)^2)^(1/2)-C*cos(d*x+c)^(2+m)*h ypergeom([1/2, 1+1/2*m],[2+1/2*m],cos(d*x+c)^2)*sin(d*x+c)/b/d/(2+m)/(sin( d*x+c)^2)^(1/2)
Leaf count is larger than twice the leaf count of optimal. \(10459\) vs. \(2(353)=706\).
Time = 37.23 (sec) , antiderivative size = 10459, normalized size of antiderivative = 29.63 \[ \int \frac {\cos ^m(c+d x) \left (A+C \cos ^2(c+d x)\right )}{a+b \cos (c+d x)} \, dx=\text {Result too large to show} \]
Time = 0.92 (sec) , antiderivative size = 338, normalized size of antiderivative = 0.96, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.242, Rules used = {3042, 3543, 3042, 3122, 3302, 3042, 3668, 333}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos ^m(c+d x) \left (A+C \cos ^2(c+d x)\right )}{a+b \cos (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )^m \left (A+C \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )}{a+b \sin \left (c+d x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 3543 |
\(\displaystyle \left (\frac {a^2 C}{b^2}+A\right ) \int \frac {\cos ^m(c+d x)}{a+b \cos (c+d x)}dx-\frac {a C \int \cos ^m(c+d x)dx}{b^2}+\frac {C \int \cos ^{m+1}(c+d x)dx}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \left (\frac {a^2 C}{b^2}+A\right ) \int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )^m}{a+b \sin \left (c+d x+\frac {\pi }{2}\right )}dx-\frac {a C \int \sin \left (c+d x+\frac {\pi }{2}\right )^mdx}{b^2}+\frac {C \int \sin \left (c+d x+\frac {\pi }{2}\right )^{m+1}dx}{b}\) |
\(\Big \downarrow \) 3122 |
\(\displaystyle \left (\frac {a^2 C}{b^2}+A\right ) \int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )^m}{a+b \sin \left (c+d x+\frac {\pi }{2}\right )}dx+\frac {a C \sin (c+d x) \cos ^{m+1}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {m+1}{2},\frac {m+3}{2},\cos ^2(c+d x)\right )}{b^2 d (m+1) \sqrt {\sin ^2(c+d x)}}-\frac {C \sin (c+d x) \cos ^{m+2}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {m+2}{2},\frac {m+4}{2},\cos ^2(c+d x)\right )}{b d (m+2) \sqrt {\sin ^2(c+d x)}}\) |
\(\Big \downarrow \) 3302 |
\(\displaystyle \left (\frac {a^2 C}{b^2}+A\right ) \left (a \int \frac {\cos ^m(c+d x)}{a^2-b^2 \cos ^2(c+d x)}dx-b \int \frac {\cos ^{m+1}(c+d x)}{a^2-b^2 \cos ^2(c+d x)}dx\right )+\frac {a C \sin (c+d x) \cos ^{m+1}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {m+1}{2},\frac {m+3}{2},\cos ^2(c+d x)\right )}{b^2 d (m+1) \sqrt {\sin ^2(c+d x)}}-\frac {C \sin (c+d x) \cos ^{m+2}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {m+2}{2},\frac {m+4}{2},\cos ^2(c+d x)\right )}{b d (m+2) \sqrt {\sin ^2(c+d x)}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \left (\frac {a^2 C}{b^2}+A\right ) \left (a \int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )^m}{a^2-b^2 \sin \left (c+d x+\frac {\pi }{2}\right )^2}dx-b \int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )^{m+1}}{a^2-b^2 \sin \left (c+d x+\frac {\pi }{2}\right )^2}dx\right )+\frac {a C \sin (c+d x) \cos ^{m+1}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {m+1}{2},\frac {m+3}{2},\cos ^2(c+d x)\right )}{b^2 d (m+1) \sqrt {\sin ^2(c+d x)}}-\frac {C \sin (c+d x) \cos ^{m+2}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {m+2}{2},\frac {m+4}{2},\cos ^2(c+d x)\right )}{b d (m+2) \sqrt {\sin ^2(c+d x)}}\) |
\(\Big \downarrow \) 3668 |
\(\displaystyle \left (\frac {a^2 C}{b^2}+A\right ) \left (\frac {a \cos ^{m-1}(c+d x) \cos ^2(c+d x)^{\frac {1-m}{2}} \int \frac {\left (1-\sin ^2(c+d x)\right )^{\frac {m-1}{2}}}{a^2-b^2+b^2 \sin ^2(c+d x)}d\sin (c+d x)}{d}-\frac {b \cos ^m(c+d x) \cos ^2(c+d x)^{-m/2} \int \frac {\left (1-\sin ^2(c+d x)\right )^{m/2}}{a^2-b^2+b^2 \sin ^2(c+d x)}d\sin (c+d x)}{d}\right )+\frac {a C \sin (c+d x) \cos ^{m+1}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {m+1}{2},\frac {m+3}{2},\cos ^2(c+d x)\right )}{b^2 d (m+1) \sqrt {\sin ^2(c+d x)}}-\frac {C \sin (c+d x) \cos ^{m+2}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {m+2}{2},\frac {m+4}{2},\cos ^2(c+d x)\right )}{b d (m+2) \sqrt {\sin ^2(c+d x)}}\) |
\(\Big \downarrow \) 333 |
\(\displaystyle \left (\frac {a^2 C}{b^2}+A\right ) \left (\frac {a \sin (c+d x) \cos ^{m-1}(c+d x) \cos ^2(c+d x)^{\frac {1-m}{2}} \operatorname {AppellF1}\left (\frac {1}{2},\frac {1-m}{2},1,\frac {3}{2},\sin ^2(c+d x),-\frac {b^2 \sin ^2(c+d x)}{a^2-b^2}\right )}{d \left (a^2-b^2\right )}-\frac {b \sin (c+d x) \cos ^m(c+d x) \cos ^2(c+d x)^{-m/2} \operatorname {AppellF1}\left (\frac {1}{2},-\frac {m}{2},1,\frac {3}{2},\sin ^2(c+d x),-\frac {b^2 \sin ^2(c+d x)}{a^2-b^2}\right )}{d \left (a^2-b^2\right )}\right )+\frac {a C \sin (c+d x) \cos ^{m+1}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {m+1}{2},\frac {m+3}{2},\cos ^2(c+d x)\right )}{b^2 d (m+1) \sqrt {\sin ^2(c+d x)}}-\frac {C \sin (c+d x) \cos ^{m+2}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {m+2}{2},\frac {m+4}{2},\cos ^2(c+d x)\right )}{b d (m+2) \sqrt {\sin ^2(c+d x)}}\) |
(a*C*Cos[c + d*x]^(1 + m)*Hypergeometric2F1[1/2, (1 + m)/2, (3 + m)/2, Cos [c + d*x]^2]*Sin[c + d*x])/(b^2*d*(1 + m)*Sqrt[Sin[c + d*x]^2]) - (C*Cos[c + d*x]^(2 + m)*Hypergeometric2F1[1/2, (2 + m)/2, (4 + m)/2, Cos[c + d*x]^ 2]*Sin[c + d*x])/(b*d*(2 + m)*Sqrt[Sin[c + d*x]^2]) + (A + (a^2*C)/b^2)*(( a*AppellF1[1/2, (1 - m)/2, 1, 3/2, Sin[c + d*x]^2, -((b^2*Sin[c + d*x]^2)/ (a^2 - b^2))]*Cos[c + d*x]^(-1 + m)*(Cos[c + d*x]^2)^((1 - m)/2)*Sin[c + d *x])/((a^2 - b^2)*d) - (b*AppellF1[1/2, -1/2*m, 1, 3/2, Sin[c + d*x]^2, -( (b^2*Sin[c + d*x]^2)/(a^2 - b^2))]*Cos[c + d*x]^m*Sin[c + d*x])/((a^2 - b^ 2)*d*(Cos[c + d*x]^2)^(m/2)))
3.8.68.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Sim p[a^p*c^q*x*AppellF1[1/2, -p, -q, 3/2, (-b)*(x^2/a), (-d)*(x^2/c)], x] /; F reeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && (IntegerQ[p] || GtQ[a, 0]) && (IntegerQ[q] || GtQ[c, 0])
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*(( b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1)*Sqrt[Cos[c + d*x]^2]))*Hypergeometric2 F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2], x] /; FreeQ[{b, c, d, n}, x] && !IntegerQ[2*n]
Int[((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)/((a_) + (b_.)*sin[(e_.) + (f_.)*( x_)]), x_Symbol] :> Simp[a Int[(d*Sin[e + f*x])^n/(a^2 - b^2*Sin[e + f*x] ^2), x], x] - Simp[b/d Int[(d*Sin[e + f*x])^(n + 1)/(a^2 - b^2*Sin[e + f* x]^2), x], x] /; FreeQ[{a, b, d, e, f, n}, x] && NeQ[a^2 - b^2, 0]
Int[(((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (C_.)*sin[(e_.) + (f_.) *(x_)]^2))/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-a)*( C/b^2) Int[(d*Sin[e + f*x])^n, x], x] + (Simp[(A*b^2 + a^2*C)/b^2 Int[( d*Sin[e + f*x])^n/(a + b*Sin[e + f*x]), x], x] + Simp[C/(b*d) Int[(d*Sin[ e + f*x])^(n + 1), x], x]) /; FreeQ[{a, b, d, e, f, A, C, n}, x] && NeQ[a^2 - b^2, 0]
Int[((d_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)]^2)^(p_.), x_Symbol] :> With[{ff = FreeFactors[Cos[e + f*x], x]}, Simp[( -ff)*d^(2*IntPart[(m - 1)/2] + 1)*((d*Sin[e + f*x])^(2*FracPart[(m - 1)/2]) /(f*(Sin[e + f*x]^2)^FracPart[(m - 1)/2])) Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b - b*ff^2*x^2)^p, x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, d, e, f, m, p}, x] && !IntegerQ[m]
\[\int \frac {\left (\cos ^{m}\left (d x +c \right )\right ) \left (A +C \left (\cos ^{2}\left (d x +c \right )\right )\right )}{a +\cos \left (d x +c \right ) b}d x\]
\[ \int \frac {\cos ^m(c+d x) \left (A+C \cos ^2(c+d x)\right )}{a+b \cos (c+d x)} \, dx=\int { \frac {{\left (C \cos \left (d x + c\right )^{2} + A\right )} \cos \left (d x + c\right )^{m}}{b \cos \left (d x + c\right ) + a} \,d x } \]
Timed out. \[ \int \frac {\cos ^m(c+d x) \left (A+C \cos ^2(c+d x)\right )}{a+b \cos (c+d x)} \, dx=\text {Timed out} \]
\[ \int \frac {\cos ^m(c+d x) \left (A+C \cos ^2(c+d x)\right )}{a+b \cos (c+d x)} \, dx=\int { \frac {{\left (C \cos \left (d x + c\right )^{2} + A\right )} \cos \left (d x + c\right )^{m}}{b \cos \left (d x + c\right ) + a} \,d x } \]
\[ \int \frac {\cos ^m(c+d x) \left (A+C \cos ^2(c+d x)\right )}{a+b \cos (c+d x)} \, dx=\int { \frac {{\left (C \cos \left (d x + c\right )^{2} + A\right )} \cos \left (d x + c\right )^{m}}{b \cos \left (d x + c\right ) + a} \,d x } \]
Timed out. \[ \int \frac {\cos ^m(c+d x) \left (A+C \cos ^2(c+d x)\right )}{a+b \cos (c+d x)} \, dx=\int \frac {{\cos \left (c+d\,x\right )}^m\,\left (C\,{\cos \left (c+d\,x\right )}^2+A\right )}{a+b\,\cos \left (c+d\,x\right )} \,d x \]